<script>
layui.use(['form', 'layedit', 'upload', 'element'], function(){
	var $ = layui.$, form = layui.form, layedit = layui.layedit, upload = layui.upload;
	//自定义验证规则
	form.verify({
		V_title : function(value, item) {
			if (value.length < 2 || value.length > 50) {
				return '标题必须2到50字符';
			}
		}
	});

	form.on('select(url-type)', function(data){
		switchLinkType(data.value);
	});

	switchLinkType("#(column.urlType)");

	var placeholder_inner = "默认以域名开头，因此不需要输入#(site_domain)，以‘/’开头";
	var placeholder_outer = "必须以'http://’或‘https://’开头";
	function switchLinkType(type){
		if(type == undefined || type == "inner"){
			$("#ID_column_url").attr("placeholder", placeholder_inner);

		} else {
			$("#ID_column_url").attr("placeholder", placeholder_outer);
		}
	}
});
</script>